<?php

	// ����������� ������ ���� �����������

	print '<div class="nav-page">' . PHP_EOL;
	print '<ul><span>' . PHP_EOL;
	
	$middle = ceil(count($this->container)/2)+1;
	    	
	$m = 1;

	foreach ($this->container as $page) {
		
		if($m==$middle) print '</span><span>' . PHP_EOL;
		
	    print '<li><div><span>' . $page->getLabel() . '</span></div>' . PHP_EOL;
	    
	    if(count($page)>0) {
			
	    	print '<ul>' . PHP_EOL;
	    	print '<li><a href='.$page->getHref().'>'.$page->get("categorydescr"). '</a></li>'. PHP_EOL;
		    foreach ($page as $subpage) {
		    	
		    	print '<li>' . $this->navigation()->menu()->htmlify($subpage) . '</li>' . PHP_EOL;
		    	
		    }
		    
		    print '</ul>' . PHP_EOL;
		    
	    } else {
	    	
			print '<ul><li><a href='.$page->getHref().'>'.$page->get("categorydescr"). '</a></li></ul>'. PHP_EOL;
			
		}

	    print '</li>' . PHP_EOL;
	    
	    $m++;
	}
	
	print '</span></ul></div>';
